/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.koller.zero.view.builder;

import de.koller.zero.ZeroRoot;
import de.koller.zero.view.PlayerListFrame;

/**
 *
 * @author User
 */
public class PlayerListComp extends javax.swing.JPanel {

	private final PlayerListFrame root;
	
	/**
	 * Creates new form PlayerListComp
	 */
	public PlayerListComp() {
		initComponents();
		root = null;
	}

	public PlayerListComp( PlayerListFrame root ) {
		this.root = root;
		initComponents();
	}
	
	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	@SuppressWarnings( "unchecked" )
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        playertable = new javax.swing.JTable();
        refresh = new javax.swing.JButton();

        playertable.setModel(root.create());
        jScrollPane1.setViewportView(playertable);

        refresh.setText("aktualisieren");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 266, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(refresh)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 292, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(refresh)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    public javax.swing.JTable playertable;
    public javax.swing.JButton refresh;
    // End of variables declaration//GEN-END:variables
}
